package com.lyc.wanandroid_kotlin.ui.fragment.mvp.presenter

import com.cxz.wanandroid.mvp.presenter.CommonPresenter
import com.lyc.wanandroid_kotlin.ui.fragment.mvp.contract.SquareContract
import com.lyc.wanandroid_kotlin.ui.fragment.mvp.model.SquareModel
import ss

/**
 * ClassName:com.lyc.wanandroid_kotlin.ui.fragment.mvp.presenter
 * Description:
 */
class SquarePresenter : CommonPresenter<SquareModel, SquareContract.View>(),
    SquareContract.Presenter {

    override fun createModel(): SquareModel? = SquareModel()

    override fun getSquareList(page: Int) {
        mModel?.getSquareList(page)?.ss(mModel, mView, page == 0) {
            mView?.showSquareList(it.data)
        }
    }
}